home *** CD-ROM | disk | FTP | other *** search
/ The Fatted Calf / The Fatted Calf.iso / Applications / Astronomy / Moon / Source / Controller.h < prev    next >
Text File  |  1993-01-19  |  2KB  |  70 lines

  1. /* Controller.h
  2.  * Part of the Moon application for the NeXT computer.
  3.  * Author:  Geoffrey S. Knauth
  4.  * Date:    January 4, 1992
  5.  *
  6.  * Permission to copy this program is hereby granted under the terms
  7.  * of the Free Software Foundation's GNU General Public License.
  8.  */
  9.  
  10. /* Initially generated by Interface Builder */
  11.  
  12. #import <objc/Object.h>
  13. #import <appkit/Button.h>
  14. #import <appkit/Form.h>
  15. #import "MoonView.h"
  16.  
  17. #define TICK_SECONDS    10.0    /* how often we should update statistics */
  18.  
  19. /* indices into statForm (matrix of text fields) */
  20. #define iJulianDate    0
  21. #define iUniversalTime    1
  22. #define iLocalTime    2
  23. #define iMoonPhase    3
  24. #define iAgeOfMoon    4
  25. #define iMoonDistance    5
  26. #define iMoonSubtends    6
  27. #define iSunDistance    7
  28. #define iSunSubtends    8
  29. #define iLastNewMoon    9
  30. #define iThisLunation    10
  31. #define iFirstQuarter    11
  32. #define iFullMoon    12
  33. #define iLastQuarter    13
  34. #define iNextNewMoon    14
  35. #define iNextLunation    15
  36.  
  37. /* toggle states for the pause button */
  38. #define RUNNING        0
  39. #define PAUSED        1
  40.  
  41. @interface Controller : Object
  42. {
  43.  
  44.   /* Initialized by IB. */
  45.     id moonView;        /* this is where we draw the moon */
  46.     id statForm;        /* output statistics */
  47.     id nowButton;        /* so we can enable/disable the button */
  48.     id pauseButton;        /* so we can query its state */
  49.     id travelText;        /* so we can query its value */
  50.     id stringTable;        /* month names, and other words */
  51.  
  52.   /* Things we initialize. */
  53.     id iconView;
  54.     double nextNewMoon;        /* Next new moon time */
  55. }
  56.  
  57. - appDidHide :sender;
  58. - appDidInit :sender;
  59. - appWillTerminate :sender;
  60.  
  61. - getUserGmtTime :(int *)year :(int *)month :(int *)day
  62.          :(int *)hour :(int *)minute :(int *)second;
  63. - (int)monthNumFromStr :(const char *)month;
  64. - pause :sender;
  65. - returnToNow :sender;
  66. - timeTravel :sender;
  67. - update;
  68.  
  69. @end
  70.